package com.csun.cmny.provider.service.impl;

import com.csun.cmny.provider.dao.CacBaseTypeMapper;
import com.csun.cmny.provider.pojo.CacBaseType;
import com.csun.cmny.provider.service.CacBaseTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("CacBaseTypeService")
public class CacBaseTypeServiceImpl implements CacBaseTypeService {
    @Resource
    CacBaseTypeMapper cacBaseTypeMapper;

    @Override
    public int insert(CacBaseType cacBaseType) {
        return cacBaseTypeMapper.insertSelective(cacBaseType);
    }

    @Override
    public int update(CacBaseType cacBaseType) {
        return cacBaseTypeMapper.updateByPrimaryKeySelective(cacBaseType);
    }

    @Override
    public CacBaseType selectCacTypeById(Integer cacTypeId) {
        return cacBaseTypeMapper.selectByPrimaryKey(cacTypeId);
    }

    @Override
    public int delById(Integer cacTypeId) {
        return cacBaseTypeMapper.deleteByPrimaryKey(cacTypeId);
    }

    @Override
    public CacBaseType selectByCacType(CacBaseType cacBaseType) {
        return cacBaseTypeMapper.selectByCacType(cacBaseType);
    }

    @Override
    public List<CacBaseType> selectShowAll(Long groupId) {
        return cacBaseTypeMapper.selectShowAll(groupId);
    }

    @Override
    public CacBaseType selectOneById(Integer cacTypeId) {
        return cacBaseTypeMapper.selectOneById(cacTypeId);
    }

    @Override
    public int copyDataToTableCnCacType(Long homeId) {
        return cacBaseTypeMapper.copyDataToTableCnCacType(homeId);
    }
}
